package com.oak.broke.model.vip.dao;

import com.oak.broke.model.vip.entity.VipUserEntity;
import com.oak.broke.model.vip.vo.api.BaseVipInfoVO;
import com.oak.broke.model.vip.vo.api.VipUserVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 会员用户表
 *
 * @author tanghan
 * @email broke@gmail.com
 * @date 2023-04-12 17:02:57
 */
@Mapper
public interface VipUserDao extends BaseMapper<VipUserEntity> {

    /**
     * 查询所有会员信息
     *
     * @param vipUserType 会员用户类型
     * @return
     */
    List<VipUserVO> listAllVipUser(@Param("vipUserType") String vipUserType);

    /**
     * 检查会员用户是否已存在
     *
     * @param userRelationCode 会员用户code
     * @param vipUserType      会员用户类型
     * @return
     */
    Boolean checkVipUserExist(@Param("userRelationCode") String userRelationCode,
                              @Param("vipUserType") String vipUserType);

    /**
     * 查询会员用户信息
     *
     * @param vipUserId 会员id
     * @return
     */
    VipUserEntity selectVipUserByVipUserId(@Param("vipUserId") String vipUserId);

    /**
     * 查询会员用户信息
     *
     * @param vipUserId
     * @return
     */
    VipUserVO selectVipUser(@Param("vipUserId") String vipUserId);

    /**
     * 查询会员信息
     *
     * @param userRelationCode 用户code
     * @param vipUserType      用户类型
     * @return
     */
    BaseVipInfoVO selectVipInfo(@Param("userRelationCode") String userRelationCode,
                                @Param("vipUserType") String vipUserType);
}
